package com.atts.baccarat.table.util;

import java.util.List;

public class CollectionUtil {

	/**
	 * 扩展list, 确保index不会越界
	 * 
	 * @param list
	 *            list
	 * @param index
	 *            index
	 */
	public static void ensureSize(List<?> list, int index) {

		int length = index - list.size();
		for (int i = 0; i < length + 1; i++) {
			list.add(null);
		}
	}

}
